load("//misc/bazel:rust.bzl", "codeql_rust_binary")
load("//misc/bazel/3rdparty/tree_sitter_extractors_deps:defs.bzl", "aliases", "all_crate_deps")

exports_files(["Cargo.toml"])

codeql_rust_binary(
    name = "extractor",
    srcs = glob(["src/**/*.rs"]),
    aliases = aliases(),
    compile_data = [
        "src/qltest_cargo.mustache",
        "src/nightly-toolchain/rust-toolchain.toml",
    ],
    proc_macro_deps = all_crate_deps(
        proc_macro = True,
    ) + [
        "//rust/extractor/macros",
    ],
    visibility = ["//rust:__subpackages__"],
    deps = all_crate_deps(
        normal = True,
    ) + [
        "//shared/tree-sitter-extractor",
    ],
)
